/*package tech.bmatch.meituan;
import tech.bmatch.meituan.model.Merchant;
import tech.bmatch.meituan.service.MerchantService;
import tech.bmatch.meituan.service.impl.MerchantServiceImpl;

import java.io.BufferedReader;
import java.io.IOException;
import  java.io.InputStream;
import  java.io.InputStreamReader;

import java.util.List;
public class ApplicationTest {
    private static MerchantService merchantService = new MerchantServiceImpl();

    public static void main(String[] args) {
        init();

        List<Merchant> merchantList = merchantService.search(120.026208,30.279212);
        for (Merchant merchant :merchantList){
            System.out.println("商家名称:" +merchant.getName());
            Double distance = merchant.getDistance();
            System.out.println("距离："+distance.intValue()+"m");
            System.out.println("-------------------------");
        }

    }
//请使用前面所学的io 知识，从控制台里手工录入剩下的6家商家数据,我觉得应该用数组来解决这个问题，但是我尝试了，没有解决，所以采用了这种最笨的方法。



    private static void init(){
        InputStream in =System.in;
        InputStreamReader reader = new InputStreamReader(in);
        BufferedReader br = new BufferedReader(reader);
        String str = null;
        double a = 0d;
        try{
            str = br.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }
        InputStream in1 =System.in;
        InputStreamReader reader1 = new InputStreamReader(in);
        BufferedReader br1 = new BufferedReader(reader);
        String str1 = null;
        try{
            str1 = br1.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }
        InputStream in2 =System.in;
        InputStreamReader reader2 = new InputStreamReader(in);
        BufferedReader br2 = new BufferedReader(reader);
        String str2 = null;
        try{
            str2 = br2.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }
        InputStream in3 =System.in;
        InputStreamReader reader3 = new InputStreamReader(in);
        BufferedReader br3 = new BufferedReader(reader);
        String str3 = null;
        try{
            str3 = br3.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }
        InputStream in4 =System.in;
        InputStreamReader reader4 = new InputStreamReader(in);
        BufferedReader br4 = new BufferedReader(reader);
        String str4 = null;
        try{
            str4 = br4.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }
        InputStream in5=System.in;
        InputStreamReader reader5 = new InputStreamReader(in);
        BufferedReader br5 = new BufferedReader(reader);
        String str5 = null;
        try{
            str5 = br5.readLine();
        } catch (IOException e){
            e.printStackTrace();
        }finally{
            try {
                br5.close();
                reader5.close();
            }catch (IOException e){
            }
        }

        Merchant merchant = new Merchant();
        merchant.setId("1");
        merchant.setName("杭州麦当劳未来城高教路餐厅");
        merchant.setLon(120.021523);
        merchant.setLat(30.275512);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("2");
        merchant.setName("肯德基宅急送（杭州高教DT店)");
        merchant.setLon(120.022002);
        merchant.setLat(30.274293);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("3");
        merchant.setName(str);
        merchant.setLon(120.029936);
        merchant.setLat(30.28479);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("4");
        merchant.setName(str1);
        merchant.setLon(120.036604);
        merchant.setLat(30.283605);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("5");
        merchant.setName(str2);
        merchant.setLon(120.04022);
        merchant.setLat(30.28932);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("6");
        merchant.setName(str3);
        merchant.setLon(120.02959);
        merchant.setLat(30.284823);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("7");
        merchant.setName(str4);
        merchant.setLon(120.019568);
        merchant.setLat(30.275002);
        merchantService.add(merchant);
        merchant = new Merchant();
        merchant.setId("8");
        merchant.setName(str5);
        merchant.setLon(120.017068);
        merchant.setLat(30.275462);
        merchantService.add(merchant);

    }
}*/
